define service {
  hostgroup_name        proxies
  service_description   http-fedoraproject.org
  check_command         check_website!fedoraproject.org!/!getfedora.org
  use                   websitetemplate
}

define service {
  hostgroup_name        proxies
  service_description   http-fedoraproject.org-wiki
  check_command         check_website!fedoraproject.org!/wiki/Fedora_Project_Wiki!Fedora Marketing
  max_check_attempts    10
  use                   websitetemplate
}

define service {
  hostgroup_name        proxies
  service_description   http-fedoraproject.org-wiki-non-cached
  check_command         check_website!fedoraproject.org!/wiki/Special:Version!MediaWiki is free software
  max_check_attempts    10
  use                   websitetemplate
}

define service {
  hostgroup_name        proxies
  service_description   http-mirrors.fedoraproject.org-mirrorlist
  check_command         check_website!mirrors.fedoraproject.org!/mirrorlist?repo=rawhide&arch=x86_64&country=global!development
  use                   websitetemplate
}

define service {
  hostgroup_name        proxies
  service_description   http-pkgdb-external
  check_command         check_website_ssl!admin.fedoraproject.org!/pkgdb/collections/!EPEL
  use                   websitetemplate
}

define service {
  hostgroup_name        proxies
  service_description   http-start.fedoraproject.org
  check_command         check_website_ssl!start.fedoraproject.org!/!The Fedora Project is maintained
  use                   websitetemplate
}

define service {
  hostgroup_name        proxies
  service_description   http-accounts
  check_command         check_website_ssl!admin.fedoraproject.org!/accounts/help/get_help/user_telephone!emergency
  use                   websitetemplate
}

define service {
  hostgroup_name        proxies
  service_description   http-bodhi
  check_command         check_website_ssl!bodhi.fedoraproject.org!/!Fedora
  max_check_attempts    8
  use                   websitetemplate
}

define service {
  hostgroup_name        proxies
  service_description   http-bodhi2
  check_command         check_website_ssl!bodhi.fedoraproject.org!/!top testers
  max_check_attempts    8
  use                   websitetemplate
}

define service {
  hostgroup_name        proxies
  service_description   http-moby-registry
  check_command         check_website_ssl!registry.fedoraproject.org!/v2/!{}
  max_check_attempts    8
  use                   websitetemplate
}

define service {
  host_name		registry-cdn
  service_description   http-moby-registry-cdn
  check_command         check_website_ssl!cdn.registry.fedoraproject.org!/v2/!{}
  max_check_attempts    8
  use                   websitetemplate
}

define service {
  hostgroup_name        proxies
  service_description   http-mbs
  check_command         check_website_ssl!mbs.fedoraproject.org!/module-build-service/1/module-builds/!items
  max_check_attempts    8
  use                   websitetemplate
}

define service {
  hostgroup_name        proxies
  service_description   http-odcs
  check_command         check_website_ssl!odcs.fedoraproject.org!/api/1/composes/!result_repofile
  max_check_attempts    8
  use                   websitetemplate
}

# Some openshift apps
define service {
  hostgroup_name        proxies
  service_description   http-waiverdb
  check_command         check_website_ssl!waiverdb-web-waiverdb.app.os.fedoraproject.org!/api/v1.0/waivers/!first
  max_check_attempts    8
  use                   websitetemplate
}

define service {
  hostgroup_name        proxies
  service_description   http-greenwave
  check_command         check_website_ssl!greenwave-web-greenwave.app.os.fedoraproject.org!/api/v1.0/policies!bodhi_update_push_stable
  max_check_attempts    8
  use                   websitetemplate
}


##
## Individual hosts

define service {
  host_name             status
  service_description   http-status.fedoraproject.org
  check_command         check_website!d6tcqd4og8l21.cloudfront.net!/index.html!All systems go
  use                   websitetemplate
}

define service {
  host_name             magazine2.fedorainfracloud.org
  service_description   http-magazine
  use                   websitetemplate
  check_command         check_website!magazine2.fedorainfracloud.org!/
}

{% if vars['nagios_location'] == 'internal' %}
##
## Other Frontend Websites 

define service {
  hostgroup_name        anitya-frontend
  service_description   http-release-monitoring.org-anitya
  check_command         check_website_ssl!release-monitoring.org!/!Anitya
  use                   websitetemplate
}

define service {
  hostgroup_name        autocloud-web
  service_description   http-autocloud-internal
  check_command         check_website!localhost!/autocloud/jobs/!Output
  max_check_attempts    8
  use                   internalwebsitetemplate
}

define service {
  hostgroup_name        badges-web
  service_description   http-badges.fedoraproject.org-tahrir
  check_command         check_website!localhost!/!Tahrir
  use                   websitetemplate
}


define service {
  hostgroup_name        bodhi2
  service_description   http-bodhi-internal
  check_command         check_website!localhost!/!Fedora
  max_check_attempts    8
  use                   internalwebsitetemplate
}

define service {
  hostgroup_name        bodhi2
  service_description   http-bodhi2-internal
  check_command         check_website!localhost!/!top testers
  max_check_attempts    8
  use                   internalwebsitetemplate
}

define service {
  hostgroup_name        darkserver
  service_description   http-darkserver-serverversion
  use                   websitetemplate
  check_command         check_website!localhost!/darkserver/serverversion!server-version
}

define service {
  hostgroup_name        datagrepper
  service_description   http-datagrepper-frontpage
  check_command         check_website!localhost!/datagrepper/reference/!General
  max_check_attempts    8
  use                   internalwebsitetemplate
}

define service {
  hostgroup_name        datagrepper
  service_description   http-datagrepper-db-query
  check_command         check_website!localhost!/datagrepper/raw/?delta=86400!timestamp
  max_check_attempts    8
  use                   internalwebsitetemplate
}

define service {
  hostgroup_name        moby-registry
  service_description   http-moby-registry
  check_command         check_website!localhost:5000!/v2/!{}
  max_check_attempts    8
  use                   internalwebsitetemplate
}

define service {
  hostgroup_name        fas
  service_description   http-accounts
  check_command         check_website!localhost!/accounts/help/get_help/user_telephone!emergency
  use                   internalwebsitetemplate
}

define service {
  hostgroup_name        github2fedmsg
  service_description	http-github2fedmsg-internal
  check_command		check_website!localhost!/github2fedmsg/!stuff
  max_check_attempts	8
  use			internalwebsitetemplate
  event_handler         restart_httpd
}

define service {
  hostgroup_name        ipsilon
  service_description   http-ipsilon-internal
  check_command         check_website!localhost!/!Federated Open Authentication
  max_check_attempts    8
  use                   internalwebsitetemplate
  event_handler         restart_httpd
}

define service {
  hostgroup_name        ipa
  service_description   http-ipa-internal
  check_command         check_website!localhost!/ipa/ui/!Identity Management
  max_check_attempts    8
  use                   internalwebsitetemplate
  event_handler         restart_httpd
}

define service {
  hostgroup_name        koschei-web
  service_description   http-koschei-internal
  check_command         check_website!localhost!/koschei/!Package summary
  max_check_attempts    8
  use                   internalwebsitetemplate
}


define service {
  hostgroup_name        mm-frontend
  service_description   http-mm-publiclist-internal
  check_command         check_website_publiclist!localhost!/mirrormanager/api/mirroradmins/?name=dl.fedoraproject.org
  use                   internalwebsitetemplate
  event_handler         restart_httpd
}

define service {
  hostgroup_name        notifs-web
  service_description   http-apps.fedoraproject.org-notifications-fmn.web
  check_command         check_website!localhost!/notifications!Notifications
  use                   websitetemplate
}

define service {
  hostgroup_name        nuancier
  service_description   http-apps.fedoraproject.org-nuancier
  check_command         check_website!localhost!/nuancier!Nuancier
  use                   websitetemplate
}

define service {
  hostgroup_name	packages
  service_description	http-packages-internal
  check_command		check_website!localhost!/packages/!Packages
  max_check_attempts	8
  use			internalwebsitetemplate
  event_handler         restart_httpd
}

define service {
  hostgroup_name        packages
  service_description   http-packages-internal-bugstab
  check_command         check_website!localhost!/packages/fcomm_connector/bugzilla/query/query_bugs/%7B%22filters%22:%7B%22package%22:%22nethack%22,%22version%22:%22%22%7D,%22rows_per_page%22:10,%22start_row%22:0%7D!total_rows
  max_check_attempts    8
  use                   internalwebsitetemplate
  # When this thing dies, you usually just need to nuke /var/cache/fedoracommunity/bugzillacookies
  #event_handler         nuke_bugzillacookies_handler
}


define service {
  hostgroup_name        pkgs
  service_description   http-pkgs-pagure
  check_command         check_website!localhost!/rpms/moreutils!The moreutils rpms
  use                   websitetemplate
}

define service {
  hostgroup_name        pkgdb
  service_description   http-pkgdb-internal
  check_command         check_website!localhost!/pkgdb/collections/!EPEL
  use                   internalwebsitetemplate
  event_handler         restart_httpd
}

define service {
  hostgroup_name        sundries
  service_description   http-freemedia-internal
  check_command         check_website!localhost!/freemedia/FreeMedia-form.html!Media
  use                   internalwebsitetemplate
}

define service {
  hostgroup_name	tagger
  service_description	http-tagger-internal
  check_command		check_website!localhost!/tagger/api/v1/score/ralph/!libravatar.org
  max_check_attempts	8
  use			internalwebsitetemplate
  #event_handler         restart_httpd
}

## Internal services 

define service {
  hostgroup_name        value
  service_description   http-møte
  check_command         check_website!localhost!/!møte
  use                   websitetemplate
}

define service {
  hostgroup_name        koji
  service_description   http-koji
  check_command         check_website!koji.fedoraproject.org!/koji/hosts!fedoraproject.org
  use                   websitetemplate
}

define service {
  hostgroup_name        koji
  service_description   http-koji-frontend
  check_command         check_website_ppc!localhost!/koji/!Recent
  use                   ppc-secondarytemplate
}

{% endif %}
